{include file='comdir/head.html'}
<body>
<div class="content">
	<div class="animated fadeInDown">
		<div class="pos"><a href="#" onClick="javascript :history.back(-1);">返回上一页</a></div>
		<form class="form-horizontal" action="javascript:void(0)" id='frm'>
			<div class="form-group">
				<label class="col-sm-2 control-label">会员登陆名</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="name" value="">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">显示名称</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="showname" value="">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">密码</label>
				<div class="col-sm-5">
					<input type="password" class="form-control" name="pass" value="123456">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">性别</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="sex1" checked name="sex" value="1">
						<label for="sex1">男</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="sex2" name="sex" value="0">
						<label for="sex2">女</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">手机号码</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="mobile" value="">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">QQ</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="qq" value="">
				</div>
			</div>
			<div class="form-group img_show_hide"  style="display:none" >
				<label class="col-sm-2 control-label">头像图片</label>
				<div class="col-sm-10">
					<img class="show_userinfoface" style="width:100px;height:30px;margin-bottom: 5px;" src="" /><br />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">头像文件</label>
				<div class="col-sm-10">
					<input type="hidden" value="" name="userface" class="userinfoface">
					<div class="iframe-box btn-success"><iframe id="upiframe" frameborder="0"  scrolling="no" src="{$_URL}Ups/upone?method=userinfoface&classname=userinfoface&callback=userinfofaceback"></iframe></div>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label">简介</label>
				<div class="col-sm-5" style="display: inline-block;vertical-align: middle;"><textarea class="form-control" name="remarks"></textarea></div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">状态</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="status1" checked name="status" value="1">
						<label for="status1">开启</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="status2" name="status" value="0">
						<label for="status2">禁止</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-5">
					<input type="button" class="btn btn-block btn-blue sub" name="name" value="提交">
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
var _URL='{$_URL}';
{literal}
function userinfofaceback(data){
	var classname=data.classname;
	$('.'+classname).val(data.img);
	$('.img_show_hide').show();
	$('.show_'+classname).attr('src',data.imgshow);
}
ajax_status=true;
$(function(){
	$('.sub').click(function(){
		var url=_URL+"Userinfo/add";
		var formjquery=_ajaxs.from('#frm');
		if(ajax_status===false){return false;}
		//ajax_status=false;
		_ajaxs.post(url,'formjquery='+formjquery,function _result(data){
			ajax_status=true;
			layer.msg(data.msg,{icon: 1}, function(){
				if(data.status){
					window.location.href=_URL+"Userinfo/lists";
				}
			});
		});
	})
})
{/literal}
</script>
</body>
</html>
